home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 476-500 / disk_499 / diglib / diglib.lzh / source / GSRST.for < prev    next >
Text File  |  1991-04-13  |  817b  |  34 lines

  1.         SUBROUTINE GSRST(XV,YV,XA,YA)
  2.         IMPLICIT NONE
  3.         REAL*4 XV,YV,XA,YA,XTEMP
  4. C
  5. C
  6.         INCLUDE DIGLIB$KOM:GCDPRM.PRM
  7. C
  8. C       ROTATE, SCALE, AND THEN TRANSLATE COORDINATES
  9. C       (TAKE VIRT. COORD. INTO SCREEN COORD.)
  10. C
  11.         XTEMP = XV
  12.         XA = XS*(RCOS*XTEMP+RSIN*YV) + XT
  13.         YA = YS*(RCOS*YV-RSIN*XTEMP) + YT
  14.         RETURN
  15.         END
  16.  
  17.         SUBROUTINE GSIRST(XA,YA,XV,YV)
  18.         IMPLICIT NONE
  19.         REAL*4 XA,YA,XV,YV,XTEMP
  20. C
  21. C       INVERSE ROTATE, SCALE, AND THEN TRANSLATE
  22. C       (TAKE ABSOLUTE COORD. INTO VIRTUAL COORD.)
  23. C
  24.         INCLUDE DIGLIB$KOM:GCDPRM.PRM
  25. C
  26. C       CONVERT ABSOLUTE CM. COORD. TO VIRTUAL CM. COORDINATES
  27. C
  28.         XTEMP = (XA-XT)/XS
  29.         YV = (YA-YT)/YS
  30.         XV = RCOS*XTEMP-RSIN*YV
  31.         YV = RCOS*YV+RSIN*XTEMP
  32.         RETURN
  33.         END
  34.